package com.coffee.order.service.sku.dao;

import com.coffee.order.api.sku.query.SkuOrderDeliveryDemandQuery;
import com.coffee.order.api.sku.result.SkuOrderDeliveryDemandResult;
import com.coffee.order.service.sku.bean.SkuOrderDeliveryDemand;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuOrderDeliveryDemandDao {
    public SkuOrderDeliveryDemand findById(Integer id);

    public SkuOrderDeliveryDemand findByMerchantIdAndId(@Param("merchantId") Integer merchantId, @Param("id") Integer id);

    public SkuOrderDeliveryDemand findByIdForUpdate(Integer id);

    public List<SkuOrderDeliveryDemand> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuOrderDeliveryDemandQuery param);

    public List<SkuOrderDeliveryDemand> page(@Param("param") SkuOrderDeliveryDemandQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SkuOrderDeliveryDemand> list(@Param("param") SkuOrderDeliveryDemandQuery param);

    public SkuOrderDeliveryDemand findFirst(@Param("param") SkuOrderDeliveryDemandQuery param);

    public Integer insert(SkuOrderDeliveryDemand param);

    Integer insertBatch(List<SkuOrderDeliveryDemand> list);

    public void updateById(@Param("param") SkuOrderDeliveryDemand param);

    public void updateBySkuOrderId(@Param("param") SkuOrderDeliveryDemand param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    List<SkuOrderDeliveryDemandResult> getSkuOrderDeliveryDemandResult(Integer skuOrderId);

}